Added xc_domain_ioport_permission to libxc, which wraps the dom0 op
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sun, 6 Nov 2005 15:39:55 +0000 (16:39 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sun, 6 Nov 2005 15:39:55 +0000 (16:39 +0100)
Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
tools/libxc/xc_domain.c
tools/libxc/xenctrl.h

index f98049f67f02b4659e8b2be8bba63a08d8454fe3..e678769cdf7b9a45a730b084ddcaa01389240eee 100644 (file)
@@ -364,6 +364,23 @@ int xc_domain_get_vcpu_info(int xc_handle,
     return rc;
 }
 
+int xc_domain_ioport_permission(int xc_handle,
+                                uint32_t domid,
+                                uint16_t first_port,
+                                uint16_t nr_ports,
+                                uint16_t allow_access)
+{
+    dom0_op_t op;
+
+    op.cmd = DOM0_IOPORT_PERMISSION;
+    op.u.ioport_permission.domain = (domid_t)domid;
+    op.u.ioport_permission.first_port = first_port;
+    op.u.ioport_permission.nr_ports = nr_ports;
+    op.u.ioport_permission.allow_access = allow_access;
+
+    return do_dom0_op(xc_handle, &op);
+}
+
 /*
  * Local variables:
  * mode: C
index 767a8ed01cb405c8e975bf72c2fd32897f7ebf12..ce30c74a898757eec64c0a54dadb62f762478b56 100644 (file)
@@ -371,6 +371,12 @@ int xc_domain_memory_decrease_reservation(int xc_handle,
                                           unsigned int extent_order,
                                          unsigned long *extent_start);
 
+int xc_domain_ioport_permission(int xc_handle,
+                                uint32_t domid,
+                                uint16_t first_port,
+                                uint16_t nr_ports,
+                                uint16_t allow_access);
+
 unsigned long xc_make_page_below_4G(int xc_handle, uint32_t domid, 
                                    unsigned long mfn);